<!-- 头部开始 -->
    <div class="header">
        <div class="hd-top clearfix">
            <a href="/{{$selCity['pinyin']}}/" class="logo" title="瓜子二手车直卖网">
                {{$selCity['value']}}二手车
            </a>

            <div class="c2city">
                <a href="javascript:;" class="choose-city">
                    <span>
                        {{$selCity['value']}}                    <i>&nbsp;</i>
                    </span>
                </a>
                    <i class="maskline"></i>
                    <div class="city-box">
                        <div class="all-city">
                            @foreach($cities as $char=>$city)
                            <dl>
                                <dt>{{$char}}</dt>
                                <dd>
                                    @foreach($city as $key=>$val)
                                        <a   href="/{{$key}}/" title="{{$val}}二手车">{{$val}}                
                                        </a>
                                    @endforeach
                                </dd>
                            </dl>
                            @endforeach
                        </div>
                        <p class="more-city">更多城市正在加紧筹备，敬请期待。</p>
                    </div>
                </div>
            @if (Auth::check())  
            <div class="uc js-uc">
                <a class="" id="js-login-temp" href="{{url('user/collect')}}">
                    <span style="font-size:16px;border-right:2px solid grey;padding-right:13px">
                        欢迎：{{Auth::user()->username}}
                    </span>
                </a>
                <a class="" id="js-login-temp" href="{{url('auth/logout')}}">
                    <span style="font-size:16px;margin-left:5px">
                        退出
                    </span>
                </a>
            </div>
            @else
            <div class="uc">
                <a id="js-login-temp" href="{{url('auth/register')}}">
                    <span style="font-size:16px">注册</span>
                </a>
            </div>

            <div class="uc" id="js-login-temp">
                <a href="{{url('auth/login')}}">
                    <span style="font-size:16px;border-right:2px solid grey;padding-right:13px">登录</span>
                </a>
            </div>
            @endif
            <!--头部搜索框 -->
            <div class="search-box" style="margin-right:150px">
                <div class="suggestion_widget" >

                   <form action="{{'search/keyword'}}" method="post">
                        <input type="text" class="search-input" id="keyInp" placeholder="搜索您想要的车" name="keyword" autocomplete="off">
                        <button class="search-btn" id="search" >搜索</button>
                        <input type="hidden" value="{{$selCity['value']}}" name="hiddenCity">
                        <input type="hidden" name="_token" value="<?php echo csrf_token()?>">
                   </form>
                </div>
            </div>
            <!-- 展示ajax返回数据 -->
            <div style="display:none" id="dataList">
                <ul></ul>
            </div>

<!--             <script>
                $('#keyInp').focus(function(){
                    $.ajax({
                        url:'search/ajaxSear',
                        get:'get',
                        data:{'key':$('#keyInp').val()}
                        success:function(data){
                            $('#dataList').css('display','block');
                        }
                    });
                });
            </script> -->
        </div>

        <!-- menu s-->
        <div class="nav">
            <div class="w">
                <a class="fl active" 
                   href="/{{$selCity['pinyin']}}/"  title="瓜子二手车">首页</a>
                <a class="fl " href="{{$selCity['pinyin']}}/buycar" title="北京个人二手车" >我要买车</a>
                <a class="fl " href="{{$selCity['pinyin']}}/sellcar" title="北京二手车出售" >我要卖车</a>  
            </div>
        </div>
    </div>
<!-- 头部结束 -->